import fetch from "./../fetch.js";
// 获取用户信息
// 获取用户个人信息
const getUser = (params) => {
  return fetch({
    url: "/system/authentication/getUser",
    method: "post"
  });
};

// 获取菜单
const getUserMenu = (params) => {
  return fetch({
    url: "/system/authentication/getUserMenu",
    method: "post"
  });
};

// 设置密保
const setPasswordProtection = (params) => {
  return fetch({
    url: "/system/authentication/setPasswordProtection",
    method: "post",
    data: JSON.stringify(params),
  });
};

// 更新密保
const renewPasswordProtection = (params) => {
  return fetch({
    url: "/system/authentication/renewPasswordProtection",
    method: "post",
    data: JSON.stringify(params),
  });
};

// 修改密码
const changePassword = (params) => {
  return fetch({
    url: "/system/authentication/changePassword",
    method: "post",
    data: JSON.stringify(params),
  });
};



export default {
  getUser,
  getUserMenu,
  setPasswordProtection,
  renewPasswordProtection,
  changePassword
}
